-- GENERATED SPELL FOR [Watch Commander Zalaphil] --


function spell0_5809(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_5809', 576, 1)
end

function spell1_5809(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5809', 8285, 1)
end

function Sorts_5809(pUnit, Event)
local choix_sorts_5809 = math.random(0, 1)
if choix_sorts_5809 == 0 then
pUnit:RegisterEvent('spell0_5809', 1, 1)
end
if choix_sorts_5809 == 1 then
pUnit:RegisterEvent('spell1_5809', 1, 1)
end
end

function mob5809_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5809', math.random(1500, 3000), 1)
end

function mob5809_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5809_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5809_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5809, 1, 'mob5809_Action')
RegisterUnitEvent(5809, 2, 'mob5809_Leave')
RegisterUnitEvent(5809, 3, 'mob5809_Kill')
RegisterUnitEvent(5809, 4, 'mob5809_Die')
